# !/usr/bin/env python
# -*- coding: utf-8 -*-
# @Author : lijikai1206@163.com
# @Time : 2021/5/1 15:04 
# @File : first_demo.py

from appium import webdriver

desired_caps = {}
desired_caps['platformName'] = 'Android'    #设备系统
desired_caps['platformVersion'] = '7.1.2'   #设备系统版本
desired_caps['deviceName'] = '127.0.0.1:62001'  #设备名称
desired_caps['appPackage'] = 'com.android.settings'
desired_caps['appActivity'] = 'com.android.settings.Settings'

driver = webdriver.Remote('http://127.0.0.1:4723/wd/hub', desired_caps) #启动app
driver.quit()